<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/2.1.2/jquery.min.js"></script>
    <script>

        $(function(){

            $("#getBtn").click(function(){

                $.post('check.php', {name:'aaa'}, function (data) {
                    alert(data.name + data.age);
                }, 'json');

            });

        });

    </script>
</head>
<body>


<button id="getBtn">获取数据</button>

</body>
</html>